package org.zh.client.config;

import java.sql.Connection;
import java.util.UUID;

import static org.zh.util.CommonStatic.random;


public class GlobalStatic {

    public static String getGlobal_TR_ID() {
        return UUID.randomUUID().toString() + random.nextInt(1000);
    }

    public static final InheritableThreadLocal<String> GLOBAL_ThreadLocal = new InheritableThreadLocal<>();
    public static final ThreadLocal<Connection> CONNECTIONTHREADLOCAL = new ThreadLocal<>();
    public static final String GLOBAL_TRANSACTION = "GLOBAL_TRANSACTION";
    public static final String GLOBAL_ROLLBACK_COMMIT = "/zhOpen/rollbackOrCommit";
    public static final String GLOBAL_REGISTRY = "/zhOpen/registry";
    public static final String GLOBAL_ERROR = "/zhOpen/error";

}
